#include <51func.h>
void * threadFunc(void *arg){
    long *pVal = (long *)arg;
    printf("child , val = %ld\n", *pVal);
    ++*pVal;
}
void func(){
    long val = 1000;
    pthread_t tid;
    pthread_create(&tid,NULL,threadFunc,&val);// long * --> void *
    printf("main, val = %ld\n", val);

}
int main(int argc, char *argv[])
{
    func();
    sleep(1);
    return 0;
}

